{% load endless %}
{% load avatar_tags %}

<div class="profile_search_page">
{% lazy_paginate objects %}

{% for profile in objects %}
    <div class="profile_search_listing">
        <table >
        <tr>
        <td style="vertical-align:middle; width: 65%; border: none;">
                <table style="border:solid 1px #F0F0EE; ">
                    {% for name, value in profile.search_preview %}
                        {% if value %}
                            <tr>
                                <td> {{ name|title }} </td>
                                <td> {{ value }} </td>
                            </tr>
                        {% endif %}
                    {% endfor %}
                </table>
        </td>
        <td style="vertical-align:middle; text-align:center; width: 35%; border: none;">
            <a href="{% url display_profile profile.register_number %}">
                <h3> {{ profile.full_name }} </h3>
                {% avatar profile.user %}
            </a>
        </td>
        </tr>
        </table>
    </div>
    <div class="profile_search_listing_bottom"></div>
{% empty %}
    <div class="msg error">
        No Results Found.
    </div>

{% endfor %}

{% show_more %}

</div>
